package com.qk.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qk.common.PageResult;
import com.qk.entity.OperateLog;
import com.qk.mapper.OperateLogMapper;
import com.qk.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements LogService {
    @Autowired
    private OperateLogMapper operateLogMapper;

    @Override
    public PageResult<OperateLog> logList(String operateUserName, Integer page, Integer pageSize) {
        Page<OperateLog> lists =operateLogMapper.logList(new Page<>(page,pageSize),operateUserName);

        return new PageResult<>(lists.getTotal(),lists.getRecords());
    }
}
